Ext.onReady(function() {

// create attributes store
/*  var attributeStore = new GeoExt.data.AttributeStore({
	        url: "../../resources/geoext/examples/data/describe_feature_type.xml"

    });
 */ 
  var attributeStore = new GeoExt.data.AttributeStore({
		proxy : new Ext.data.HttpProxy({
	        url: "../../resources/geoext/examples/data/describe_feature_type.xml"
			})
	/*
,	reader: new GeoExt.data.AttributeReader({
				fields:[{name:'Name',mapping:'name'},
						{name:'MinOccurs',mapping:'minOccurs'}
						]	
		})
*/
    });
	
	loadUrl = function(){
		console.log('url',this)
	}


    form = new Ext.grid.GridPanel({
        renderTo: Ext.getBody(),
      	store: attributeStore,
        autoScroll: true,
        height: 400,
        width: 900,
 		columns:[{
	            	header: "Name"
	            ,	width: 200
	            ,	dataIndex: "name"
        	},{
					header: "MinOccurs"
	            ,	width: 200
	            ,	dataIndex: "minOccurs"
			}]
		,	tbar: [{
						xtype:'label'
					,	style:"padding:0 5px"	
					,	text:'WFS Server URI: '	
					},{
						xtype: 'textfield'  
            		,	fieldLabel: 'WFS Server URI:'
					,	width:350
					,	ref: 'url'
		        	},{
            			text: 'Load'
					,	style:"padding:5px"
					,	handler: this.loadUrl
					, 	scope: this
        			}
					]
		
    });

	
    attributeStore.load();


});

